//
//  CircularProgressView.h
//  CareRingApp
//
//  Created  on 2025/2/13.
//  带端点的环形进度条
    

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
/*
 // 在视图控制器中使用
 CircularProgressView *progressView = [[CircularProgressView alloc] initWithFrame:CGRectMake(50, 100, 200, 200)];
 progressView.progressColor = [UIColor blueColor];
 progressView.trackColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.3];
 progressView.lineWidth = 10.0;
 [self.view addSubview:progressView];

 // 设置进度（带动画）
 [progressView setProgress:0.75 animated:YES];
 */
@interface CircularProgressView : UIView
@property (nonatomic, assign) CGFloat progress; // 进度值 (0.0 - 1.0)
@property (nonatomic, strong) UIColor *progressColor; // 进度条颜色
@property (nonatomic, strong) UIColor *trackColor; // 轨道颜色
@property (nonatomic, assign) CGFloat lineWidth; // 线条宽度
@property (nonatomic, strong) UILabel *percentageLabel; // 百分比标签

@property (nonatomic, strong) UIColor *startCapColor; //开始端点颜色
@property (nonatomic, strong) UIImageView *midImageView;

-(void)reset;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated;
@end

NS_ASSUME_NONNULL_END
